Conditions | 2 |
Total Lines | 8 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { getGlobalStorageProvider } from "./browserApi/storageProvider"; |
||
12 | |||
13 | function restoreOptions() { |
||
14 | document.querySelectorAll(OPTION_SELECTOR).forEach(optionElement => { |
||
15 | let optionInputElement = optionElement as HTMLInputElement; |
||
16 | let defaultValue = optionInputElement.dataset.defaultValue === 'true' ? true : false; |
||
17 | |||
18 | getGlobalStorageProvider().getDataAsBoolean(optionInputElement.id, defaultValue, value => { |
||
19 | optionInputElement.checked = value; |
||
20 | }); |
||
51 | }); |